<template>
	<view>
		<view class="lb-main-32">
			<view class="lb-scan">
				<view class="scan-icon" @click="scan">
					<image src="/static/icon/scan.png" mode=""></image>
				</view>
				<u-line direction="col" color="#CCCCCC" margin="0 24rpx"></u-line>
				<view class="scan-input">
					<input type="text" placeholder="请输入美团优惠券" placeholder-style="font-size: 24rpx; color: #CCCCCC;">
				</view>
			</view>

			<view class="lb-btn">
				核销券码并预约
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			//扫一扫
			scan() {
				// const q = decodeURIComponent(query.q) // 获取到二维码原始链接内容
				// console.log(q)//

				let _this = this;
				// 只允许通过相机扫码
				uni.scanCode({
					onlyFromCamera: true,
					success: function(res) {
						console.log(res)
						// let id = _this.getQueryVariable('id', res.result) //code是url后面带的
						
					}
				});
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #FFFFFF;
	}

	.lb-scan {
		height: 88rpx;
		// background: rgba(255, 255, 255, 0.39);
		box-shadow: 1rpx 2rpx 4rpx rgba(0, 0, 0, 0.16);
		border-radius: 44rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 24rpx;
		box-sizing: border-box;

		.scan-icon {
			width: 36rpx;
			height: 36rpx;

		}

		.scan-input {
			input {
				font-size: $main-font-28;
				color: $main-font-color;
			}
		}
	}

	.lb-btn {
		width: 600rpx;
		height: 88rpx;
		background: linear-gradient(135deg, #F7583F 0%, #F28F4C 100%);
		border-radius: 44rpx;
		line-height: 86rpx;
		text-align: center;
		font-size: $main-font-28;
		color: $main-font-color-white;
		margin: 64rpx auto 0;
	}
</style>